﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CSCDBookConverter.Utilities
{
    internal class Diacritics
    {
        static char[] arrFind = new char[] { 'ā', 'ī', 'ū', 'ṭ', 'ñ', 'ṃ', 'ṇ', 'ṅ', 'ḷ', 'ḍ', 'Ā', 'Ī', 'Ū', 'Ṭ', 'Ñ', 'Ḍ' };
        static char[] arrReplace = new char[] { 'a', 'i', 'u', 't', 'n', 'm', 'n', 'n', 'l', 'd', 'A', 'I', 'U', 'T', 'N', 'D' };

        public static string ConvertDiac(string strInput)
        {
            for (int i = 0; i < arrFind.Length; i++)
                strInput = strInput.Replace(arrFind[i], arrReplace[i]);

            return strInput;
        }
    }
}
